package com.fezs.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SortEnum implements BaseEnum<Integer> {

    ASC(1, "正序"),
    DESC(2, "倒序");

    private final Integer code;
    private final String descp;

    public static SortEnum getEnumByCode(Integer code){
        switch (code) {
            case 1:
                return ASC;
            case 2:
                return DESC;
        }
        return ASC;
    }

}
